package com.chengxiaoxiao.utils.db;

import java.sql.ResultSet;

public class ScalarHandler implements ResultSetHandler {
    @Override
    public Object handle(ResultSet rs) {
        try {
            if (rs.next()) {
                return rs.getInt(1);
            }
        } catch (Exception e) {
            throw new IllegalArgumentException("参数传递错误");
        }
        return null;
    }
}
